//
//  HomeCell.m
//  HMSupplier
//
//  Created by 孙鹏飞 on 2017/7/5.
//  Copyright © 2017年 haohao. All rights reserved.
//

#import "HomeCell.h"
#import "TodayOrder.h"

@interface HomeCell()
@property (weak, nonatomic) IBOutlet UIImageView *iconView;

@property (weak, nonatomic) IBOutlet UILabel *itemName;

@property (weak, nonatomic) IBOutlet UILabel *weightLabel;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *rightC;


@end

@implementation HomeCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    _rightC.constant = 50 * KEYWIDTH;
}


- (void)setModel:(TodayOrder *)model
{
    _model = model;
    
    [_iconView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",kImageUrl,_model.logo]] placeholderImage:[UIImage imageWithColor:[UIColor colorWithHexString:@"eeeeee"]]];
    _itemName.text = model.item_name;
    _weightLabel.text = [NSString stringWithFormat:@"%@%@",model.ct,model.weight];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
